Resource URL: /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

    Overview: This resource applies the standard collection item pattern to
              individual OneFS cloud accounts. ACCOUNT in the resource path is
              the account name.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve cloud account information.

       URL: GET /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

Query arguments:

GET response body schema:
{
  "type": "object", 
  "properties": {
    "accounts": {
      "items": {
        "type": "object", 
        "description": "A cloud account object", 
        "properties": {
          "account_id": {
            "type": "string", 
            "description": "(S3 only) The user id of the S3 account"
          }, 
          "metadata_bucket": {
            "type": "string", 
            "description": "The machine generated name of the account bucket to store metadata"
          }, 
          "account_username": {
            "type": "string", 
            "description": "The username required to authenticate against the cloud service"
          }, 
          "birth_cluster_id": {
            "type": "string", 
            "description": "The guid of the cluster where this account was created"
          }, 
          "telemetry_bucket": {
            "type": "string", 
            "description": "(S3 only) The name of the bucket into which generated metrics reports are placed by the cloud service provider"
          }, 
          "bucket": {
            "type": "string", 
            "description": "The machine generated name of the account bucket to store data"
          }, 
          "uri": {
            "type": "string", 
            "description": "A valid URI pointing to the location of the cloud storage"
          }, 
          "storage_region": {
            "type": [
              "string", 
              "null"
            ], 
            "description": "(S3 only) An appropriate region for the S3 account.  For example, faster access times may be gained by referencing a nearby region"
          }, 
          "state_details": {
            "type": "string", 
            "description": "Gives further information to describe the state of this account"
          }, 
          "state": {
            "enum": [
              "OK", 
              "disabled", 
              "unreachable"
            ], 
            "type": "string", 
            "description": "Indicates whether this account is in a good state (\"OK\"), disabled (\"disabled\") or inaccessible via the network (\"unreachable\")"
          }, 
          "pool": {
            "type": "string", 
            "description": "Name of the pool referencing this account.  Empty if none."
          }, 
          "key": {
            "type": "string", 
            "description": "A valid authentication key for connecting to the cloud"
          }, 
          "skip_ssl_validation": {
            "type": "boolean", 
            "description": "Indicates whether to skip SSL certificate validation when connecting to the cloud"
          }, 
          "type": {
            "enum": [
              "isilon", 
              "ecs", 
              "virtustream", 
              "azure", 
              "s3", 
              "ran", 
              "ecs2"
            ], 
            "type": "string", 
            "description": "The type of cloud protocol required.  E.g., \"isilon\" for EMC Isilon, \"ecs\" for EMC ECS Appliance, \"virtustream\" for Virtustream Storage Cloud, \"azure\" for Microsoft Azure and \"s3\" for Amazon S3"
          }, 
          "id": {
            "type": "string", 
            "description": "A globally unique name for this account"
          }, 
          "enabled": {
            "type": "boolean", 
            "description": "Whether this account is explicitly enabled or disabled by a user"
          }, 
          "name": {
            "type": "string", 
            "description": "A unique name for this account"
          }
        }
      }, 
      "type": "array"
    }, 
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }
  }
}

********************************************************************************

Method PUT: Modify cloud account.  All fields are optional, but one or more
            must be supplied.

       URL: PUT /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "description": "A cloud account object", 
  "properties": {
    "account_id": {
      "type": "string", 
      "description": "(S3 only) The user id of the S3 account"
    }, 
    "account_username": {
      "type": "string", 
      "description": "The username required to authenticate against the cloud service"
    }, 
    "birth_cluster_id": {
      "type": "string", 
      "description": "The guid of the cluster where this account was created"
    }, 
    "telemetry_bucket": {
      "type": "string", 
      "description": "(S3 only) The name of the bucket into which generated metrics reports are placed by the cloud service provider"
    }, 
    "enabled": {
      "type": "boolean", 
      "description": "Whether this account is explicitly enabled or disabled by a user"
    }, 
    "uri": {
      "type": "string", 
      "description": "A valid URI pointing to the location of the cloud storage"
    }, 
    "storage_region": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "(S3 only) An appropriate region for the S3 account.  For example, faster access times may be gained by referencing a nearby region"
    }, 
    "key": {
      "type": "string", 
      "description": "A valid authentication key for connecting to the cloud"
    }, 
    "skip_ssl_validation": {
      "type": "boolean", 
      "description": "Indicates whether to skip SSL certificate validation when connecting to the cloud"
    }, 
    "name": {
      "type": "string", 
      "description": "A unique name for this account"
    }
  }
}

There is no response body for this method.

********************************************************************************

Method DELETE: Delete cloud account.

          URL: DELETE /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

There are no query arguments for this method.

There is no response body for this method.
